package com.regent.central.bill.service.bean.stock;

import com.regent.central.bill.core.storehouse.StockStyle;
import com.regent.central.bill.repository.storehouse.StockStyleMapper;
import com.regent.central.bill.service.storehouse.StockStyleService;
import com.regent.central.infrastructure.service.bean.DomainServiceBean;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;
@Service
public class StockStyleServiceBean extends DomainServiceBean<StockStyleMapper, StockStyle> implements StockStyleService {
    @Override
    @Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
    public void updateStock(String goodsId, String storehouseId, BigDecimal stock)  {
        mapper.updateStock(goodsId, storehouseId, stock);
    }
}
